<!DOCTYPE html>
<html>
<head>
    <!--{template mobile/mobile_header}-->
    <title>{lang share}</title>
</head>
<body>
<section class="weui-address">
    <a href="{MOD_URL}" class="weui-index">
        <span class="dzz dzz-home dzz-index"></span>
        <i class="dzz dzz-vline dzz-index-vline"></i>
    </a>
    <div class="weui-address-container" id="weui_address_scroll">
        <div class="scroller">
            <ul class="weui-address-field">
                <li>
                    <a href="{$_G['siteurl']}{MOD_URL}&op=mobile&do=share">{lang share}</a><span class="dzz dzz-chevron-right"></span>
                </li>
            </ul>
        </div>
    </div>
</section>
<!--列表开始-->
<section class="weui-cells weui-cells__recent weui-cells__margin_footer" id="fileList-share">


</section>
<!--无内容提示页-->
<div class="weui-cell-search-normal" style="display: none;">
	<!--{template mobile/template_normal}-->
</div>
<!--底部开始-->
<footer class="weui-cell-footer">
    <a href="search.htm" class="weui-footer-item searchfile">
        <i class="dzz dzz-search"></i>
        <p>{lang search}</p>
    </a>
    <a href="javascript:;" class="weui-footer-item" onclick="location.reload();">
        <i class="dzz dzz-refresh"></i>
        <p>{lang refresh}</p>
    </a>
</footer>
<!--底部结束-->
</body>
<script type="text/javascript" src="static/jquery_weui/js/jquery-weui.min.js"></script>
<script type="text/javascript" src="{MOD_PATH}/js/mobile/appevent.js"></script>
<script type="text/javascript">
    var param = {page:0,disp:3,asc:0,total:'{$total}'};
    $(function () {
        $.post(MOD_URL+'&op=mobile&do=share&operation=filelist', {k: Math.random()}, function (html) {
            $('#fileList-share').html(html);
            $('.weui-cells__margin_footer').css('margin-bottom','70px');
            if(!param.total){
                var con = $('.weui-cell-search-normal').html();
                $('#fileList-share').html(con);
                $('.weui-cells__margin_footer').css('margin-bottom',0);
                return false;
            }

        })
        height();
    })
    $(document).off('tap.searchfile').on('tap.searchfile', '.searchfile', function () {
        window.location.href =  '{MOD_URL}&op=mobile&do=search';
    })
    //单页滚动加载
    var loading = false;  //状态标记
	
    $(document.body).infinite().on("infinite", function () {
        if (loading) return;
        loading = true;
		param.page++;
		jQuery.ajax({
			url: MOD_URL+'&op=mobile&do=share&operation=filelist',
			type: 'get',
			data: param,
			success: function (html) {
				console.log(html);
				if(html!=''){
					 jQuery(html).appendTo("#fileList-share");
					 loading = false;
				}else {
					loading = true;
					 jQuery(document.body).destroyInfinite();
				}
			}
		})
    });
    //获取id高度
    function height(){
        var h = $(document).outerHeight(true);
        var h2 = $('.weui-cell-footer').outerHeight(true);
        $('.weui-cell-search-images').css('height',h-h2);
    }
</script>
<!--{hook footer_tpl}-->
<!--{eval output();}-->
</html>

